<template>
  <div class="yang">
    <h2>movie页面  ---- {{$route.params.id}}----{{id}}</h2>
    <button @click="showThis">打印 this</button>
  </div>
</template>

<script>
export default {
  props:['id'],
  data() {
    return {
      
    }
  },
  methods: {
    showThis() {
      console.log(this.$route.params.id)
      // this.id = this.$route.params.id
    }
  },
}
</script>

<style scoped>
 .yang {
   width: 100%;
   height: 200px;
   background-color: rgb(144, 134, 236);
 }
</style>